<#include "header1.ftl">
<div class = "container">
    <#include "crumbs.ftl">
    <div class = "column-box col-lg-8 blog-main">
        <div class = "sidebar-box category-box white" style = "margin-bottom: 20px;">
            <a href = "<@shishuo_folder_url_tag folderId=folder.folderId/>"><h2
                    class = "blog-post-title">${folder.name}</h2></a>
        <@shishuo_article_page_tag folderIds="${folder.folderId}" p=p rows=6>
            <#if tag_article_page?size!=0>
                <#list tag_article_page.list as tag_article>
                    <div class = " zixun-container">
                    <#--<#if tag_article.picture != ''>-->
                        <a class = "zixun-img" href = "/article/${tag_article.articleId}.htm">
                            <img src = "/<#if tag_article.picture != ''>${tag_article.picture}<#else>resource/images/default.png</#if>" class = "img-responsive" style = "border: 1px solid #CDC7BB; margin: 0 auto; ">
                        </a>
                    <#--</#if>-->
                        <div class = "zixun-content ">
                            <div class = "zixun-title"><a
                                    href = "/article/${tag_article.articleId}.htm">${tag_article.title}</a></div>
                            <div class = "zixun-summary"><@shishuo_text_cut_utils text=tag_article.content append="..." cut=60/></div>
                            <div class = "zixun-date" style = "text-align: right">${tag_article.createTime?date}</div>
                        </div>
                    </div>
                </#list>
            </#if>


            <#assign prevPage=1>
            <#if (tag_article_page.pageNum-1) lte 1>
                <#assign prevPage = 1 >
            <#else>
                <#assign  prevPage = tag_article_page.pageNum -1 >
            </#if>

            <#assign nextPage = tag_article_page.pageCount>
            <#if (tag_article_page.pageNum + 1) gte tag_article_page.pageCount>
                <#assign nextPage = tag_article_page.pageCount >
            <#else>
                <#assign nextPage = tag_article_page.pageNum +  1>
            </#if>

        </@shishuo_article_page_tag>
            <ul class = "pager">
                <li><a href = "<@shishuo_folder_url_tag folderId=folder.folderId/>?p=${prevPage}"
                       target = "_self">上一页</a></li>
                <li>当前是第${tag_article_page.pageNum}页，共有${tag_article_page.pageCount}页</li>
                <li><a href = "<@shishuo_folder_url_tag folderId=folder.folderId/>?p=${nextPage}"
                       target = "_self">下一页</a></li>
            </ul>

        </div>
    </div>

    <style>
        .column-box {
            margin: 0;
        }

        .zixun-container {
            border-bottom: 1px dashed rgb(202, 202, 202);
            padding: 1em 0;
        }

        .zixun-img {
            border: 1px solid #f0f0f0;
            height: 141px;
            overflow: hidden;
            width: 250px;
            float: left !important;
        }

        .zixun-content {
            height: 141px;
            position: relative;
            margin-left: 260px;
        }

        .zixun-title {
            font-size: 16px;
            font-weight: bold;
            line-height: 22px;
        }

        .zixun-summary {
            height: 80px;
        }
    </style>
    <div class = "col-lg-4">
    <#include "zixun-sidebar.ftl"/>
    </div>
    <!-- /.blog-sidebar -->
</div>
<!-- /.row -->
<#include "footer.ftl">